package com.lyf.service.impl;

import com.lyf.dao.DeptDao;
import com.lyf.dao.impl.DeptDaoImpl;
import com.lyf.pojo.Dept;
import com.lyf.service.DeptService;
import com.lyf.utils.PageModel;

import java.util.List;

public class DeptServiceImpl implements DeptService {
    DeptDao deptDao = new DeptDaoImpl();
    @Override
    public void add(Dept dept) {
        deptDao.add(dept);
    }

    @Override
    public void delete(Integer id) {
        deptDao.delete(id);
    }

    @Override
    public void update(Dept dept) {
        deptDao.update(dept);
    }

    @Override
    public List<Dept> selectAll() {
        return deptDao.selectAll();
    }

    @Override
    public Dept selectById(Integer id) {
        return deptDao.selectById(id);
    }

    @Override
    public List<Dept> queryDept(Dept dept, PageModel model) {
        return deptDao.queryDept(dept,model);
    }

    @Override
    public int getTotalDeptCount(Dept dept) {
        return deptDao.getTotalDeptCount(dept);
    }
}
